/***************************************************************************
 *   Copyright (C) 2007 by Warren Kenny   				   *
 *   warren.kenny@gmail.com   						   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
 
template< class T > inline
gsLink<T>::gsLink() :
m_next( GS_NULL ),
m_previous( GS_NULL )
{}


template< class T > inline
gsLink<T>::gsLink( const gsLink& other ) :
m_next( GS_NULL ),
m_previous( GS_NULL ),
m_object( other.m_object )
{}
	

template< class T > inline
gsLink<T>::gsLink( const T& object ) :
m_next( GS_NULL ),
m_previous( GS_NULL ),
m_object( object )
{}


template< class T > inline
gsLink<T>::gsLink( const T& object, gsLink<T>* previous, gsLink<T>* next ) :
m_next( next ),
m_previous( previous ),
m_object( object )
{}

template< class T > inline
void gsLink<T>::set( const T& object )
{
	m_object = object;
}
	

template< class T > inline
T& gsLink<T>::get()
{
	return m_object;
}


template< class T > inline
const T& gsLink<T>::get() const
{
	return m_object;
}


template< class T > inline
void gsLink<T>::setLinks( gsLink<T>* previous, gsLink<T>* next )
{
	m_previous = previous;
	m_next = next;
}


template< class T > inline
void gsLink<T>::setNext( gsLink<T>* next )
{
	m_next = next;
}


template< class T > inline
gsLink<T>* gsLink<T>::next()
{
	return m_next;
}


template< class T > inline
void gsLink<T>::setPrevious( gsLink<T>* previous )
{
	m_previous = previous;
}


template< class T > inline
gsLink<T>* gsLink<T>::previous()
{
	return m_previous;
}


template< class T > inline
gsLink<T>::~gsLink()
{
	m_next = m_previous = GS_NULL;
}